package com.open4cn.simulator.device.xrite;

import com.open4cn.simulator.core.connector.ConnectorModeEnum;
import com.open4cn.simulator.core.device.DeviceParameters;
import com.open4cn.simulator.core.device.IDevice;
import com.open4cn.simulator.core.device.IDeviceFactory;
import com.open4cn.simulator.core.ext.XriteStatus;
import com.open4cn.simulator.device.DeviceQuickBuildHelper;
import com.open4cn.simulator.parser.xrite.x7800.ApertureGet;
import com.open4cn.simulator.parser.xrite.x7800.BlackDone;
import com.open4cn.simulator.parser.xrite.x7800.BlackRun;
import com.open4cn.simulator.parser.xrite.x7800.CurmodeGet;
import com.open4cn.simulator.parser.xrite.x7800.CurmodeSet;
import com.open4cn.simulator.parser.xrite.x7800.FlashGet;
import com.open4cn.simulator.parser.xrite.x7800.GetMeas;
import com.open4cn.simulator.parser.xrite.x7800.GetMeasDone;
import com.open4cn.simulator.parser.xrite.x7800.GetMeasRun;
import com.open4cn.simulator.parser.xrite.x7800.MeasDone;
import com.open4cn.simulator.parser.xrite.x7800.PickupDone;
import com.open4cn.simulator.parser.xrite.x7800.PickupGet;
import com.open4cn.simulator.parser.xrite.x7800.PickupSet;
import com.open4cn.simulator.parser.xrite.x7800.PositionGet;
import com.open4cn.simulator.parser.xrite.x7800.SerialNumGet;
import com.open4cn.simulator.parser.xrite.x7800.Unknown7800;
import com.open4cn.simulator.parser.xrite.x7800.UvDone;
import com.open4cn.simulator.parser.xrite.x7800.UvGet;
import com.open4cn.simulator.parser.xrite.x7800.UvSet;
import com.open4cn.simulator.parser.xrite.x7800.Version;
import com.open4cn.simulator.parser.xrite.x7800.WhiteDone;
import com.open4cn.simulator.parser.xrite.x7800.WhiteRun;
import com.open4cn.simulator.protocol.xrite.Xrite7800Decoder;
import com.open4cn.simulator.protocol.xrite.Xrite7800Eecoder;

/**
 * @author yinxiaopeng
 * @version 1.0.0
 * @company 致景科技
 * @department 飞梭BU/研发
 * @description
 * @Email yinxiaopeng@zj.tech
 * @date 2022-08-07 14:37
 */
public class Xrite7800Factory implements IDeviceFactory {

    @Override
    public IDevice build(DeviceParameters parameters) {
        IDevice device = DeviceQuickBuildHelper.start()
                .deviceParameters(parameters)
                .device(Xrite7800.class)
                .connectorMode(ConnectorModeEnum.TCP_SERVER)
                .customDeviceStatus(XriteStatus.class)
                .decoder(Xrite7800Decoder.class)
                .encoder(Xrite7800Eecoder.class)
                .instructionParser(MeasDone.class)
                .instructionParser(ApertureGet.class)
                .instructionParser(BlackDone.class)
                .instructionParser(BlackRun.class)
                .instructionParser(CurmodeGet.class)
                .instructionParser(CurmodeSet.class)
                .instructionParser(FlashGet.class)
                .instructionParser(GetMeas.class)
                .instructionParser(GetMeasDone.class)
                .instructionParser(GetMeasRun.class)
                .instructionParser(PickupDone.class)
                .instructionParser(PickupGet.class)
                .instructionParser(PickupSet.class)
                .instructionParser(SerialNumGet.class)
                .instructionParser(UvDone.class)
                .instructionParser(UvGet.class)
                .instructionParser(UvSet.class)
                .instructionParser(Version.class)
                .instructionParser(WhiteDone.class)
                .instructionParser(WhiteRun.class)
                .instructionParser(PositionGet.class)
                .instructionParser(Unknown7800.class)
                .toBuild();
        return device;
    }
}
